import { createRoot } from "react-dom/client";
import "./assets/style/index.css";

// 路由
import { AppRouter } from "./router";
// store
import store from "./store";
import { Provider } from "react-redux";
// antd
import { ConfigProvider } from "antd";
import "@ant-design/v5-patch-for-react-19";
// 由于 antd 组件的默认文案是英文，所以需要修改为中文
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import zhCN from "antd/locale/zh_CN";
import { StyleProvider } from "@ant-design/cssinjs";

dayjs.locale("zh-cn");

createRoot(document.getElementById("root")!).render(
    <Provider store={store}>
        <ConfigProvider locale={zhCN}>
            <StyleProvider layer>
                <AppRouter></AppRouter>
            </StyleProvider>
        </ConfigProvider>
    </Provider>
);
